/*
 * Filename: Circle.h
 * Author: luozi
 * Date: 2024-05-23
 * Description: This file defines the circle class
 * 
 * Copyright (c) 2024, xx-luozi-xx
 * All rights reserved.
 * 
 * Version: 1.0.0
 * 
 * Code Repository Links: https://gitee.com/xx_luozi_xx/se_lab_240523
 */

#ifndef _CIRCLE_H
#define _CIRCLE_H

#include"Point.h" 
#include"Shape.h" 
#include<iostream>

class Circle:public Shape{  //圆型类，继承 
public:	
	Circle(const Point& center, float r) 
		:_center(center), _r(r)
	{  //圆心，半径
	}
	virtual void show()	{
    	cout<<"Circle center:("<<_center.getX()<<","<<_center.getY()<<")"<<" radius:"<<_r<<endl;
	}
	const Point& getCenter() const { return _center; }
	float getR() const { return _r; }
private:	
	Point _center;
	float _r;
};

#endif
